//
//  FirstViewController.m
//  UI09_作业
//
//  Created by dllo on 16/6/16.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "FirstViewController.h"
#import "AddRainView.h"
@interface FirstViewController ()<AddRainViewDelegate>

@end

@implementation FirstViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor redColor];
        self.automaticallyAdjustsScrollViewInsets = NO;
self.navigationItem.title = @"第1张图片";
    self.navigationController.navigationBar.translucent = NO;
    [self createView];
}
- (void)createView{
    AddRainView *picture = [[AddRainView alloc] initWithFrame:CGRectMake(0, 0, 300, 400)];
    picture.backgroundColor = [UIColor grayColor];
    picture.center = self.view.center;
    picture.delegate = self;
    [self.view addSubview:picture];
    [picture release];
    
    //创建图片数组
    UIImage *image1 = [UIImage imageNamed:@"1.JPG"];
    UIImage *image2 = [UIImage imageNamed:@"2.JPG"];
    UIImage *image3 = [UIImage imageNamed:@"3.JPG"];
    UIImage *image4 = [UIImage imageNamed:@"4.JPG"];
    UIImage *image5 = [UIImage imageNamed:@"5.JPG"];
    UIImage *image6 = [UIImage imageNamed:@"6.JPG"];
    picture.imageArray = @[image6,image1,image2,image3,image4,image5,image6,image1];
    

    
}
- (void)passValue:(NSInteger)page{
    
    self.navigationItem.title = [NSString stringWithFormat:@"第%ld张图片",page + 1];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
